@extends('admin_system/public/layout')
@section('content')
    <div class="col-xs-12">
        <p class="float-left"><strong>当前位置：</strong>广告管理>>广告列表</p>
    </div>

    <div class="content-box col-xs-12 mt20 pb20 pt20">

        <table class="table table-hover table-bordered">
            <tr>
                <th>编号</th>
                <th>名称</th>
                <th>图片</th>
                <th>排序</th>
                <th>状态</th>
                <th>操作</th>
            </tr>

            @foreach($ads as $ad)
            <tr>
                <td>{{$loop->iteration}}</td>
                <td>{{$ad->ad_name}}</td>
                <td><img src="{{asset($ad->ad_img)}}" class="h80"></td>
                <td>{{$ad->ad_sort}}</td>
                <td>
                    @if($ad->is_delete == 1)
                        <span class="glyphicon glyphicon-remove text-gray"></span>
                    @else
                        <span class="glyphicon glyphicon-ok text-green"></span>
                    @endif
                </td>
                <td>
                    <a href="{{asset('admin_system/ad/edit?adId='.$ad->ad_id)}}" class="btn btn-xs btn-info">编辑</a>
                    <a href="{{asset('admin_system/ad/delete?adId='.$ad->ad_id)}}" class="btn btn-xs btn-danger">删除</a>
                    @if($ad->is_delete == 1)
                        <a class="btn btn-xs btn-info" href="{{asset('admin_system/ad/close_or_show?isDelete=0&adId='.$ad->ad_id)}}">显示</a>
                    @else
                        <a class="btn btn-xs btn-warning" href="{{asset('admin_system/ad/close_or_show?isDelete=1&adId='.$ad->ad_id)}}">关闭</a>
                    @endif
                </td>
            </tr>
            @endforeach
        </table>
    </div>
@endsection
